package lj.fx.tool.component;

import javafx.application.Application;
import javafx.stage.Stage;
import lombok.NoArgsConstructor;
import lj.fx.tool.ToolStage;

/**
 * @author: liuwenju
 * @date: 2023/6/9 11:58
 * @version: 1.0
 */
@NoArgsConstructor
public class ComApplication extends Application {

    public Stage stage;
    public ToolStage toolStage;

    /**
     * 是否默认初始胡
     * @param isInit
     */
    public ComApplication(boolean isInit) {
        if (isInit) {
            launch();
        }
    }

    @Override
    public void start(Stage primaryStage) throws Exception {
        stage = primaryStage;
        toolStage = new ToolStage(stage);
        stage.setWidth(500);
        stage.setHeight(500);
        stage.show();
    }
}
